using System;

namespace Common.Core
{
	public class DisposableActionContainer : IDisposable
	{
		readonly Action action;

		public DisposableActionContainer( Action action )
		{
			Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull( action, "action" );
			this.action = action;
		}

		public void Dispose()
		{
			action();
		}
	}
}